﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ImportInternalElementViewModel.cs" >
//   J. Prinz
// </copyright>
// <summary>
//   UI Representation of an Internal Element <see cref="InternalElementType" /> which has added to the CAEX-Document as a result of an import
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace AutomationMLMapper.ViewModels.CAEXObjectViewModels
{
    using CAEX_ClassModel;

    using AutomationMLMapper.ViewModels.SystemViewModels;

    /// <summary>
    ///   UI Representation of an Internal Element <see cref="InternalElementType" /> imported in the CAEX-Document of the TargetSystem (<see cref="TargetSystemViewModel"/>)
    /// </summary>
    public class ImportInternalElementViewModel : InternalElementViewModel
    {
        #region Fields

        /// <summary>
        ///   <see cref="mapToClass"/>
        /// </summary>
        private bool mapToClass;

        #endregion

        #region Constructors and Destructors

        /// <summary>
        ///  Initializes a new instance of the <see cref="ImportInternalElementViewModel"/> class. 
        /// </summary>
        /// <param name="element">
        ///  a CAEX - InternalElement 
        /// </param>
        public ImportInternalElementViewModel(InternalElementType element)
            : base(element)
        {
        }

        #endregion

        #region Public Properties

        /// <summary>
        ///   DisplayName of the CAEX-Element in the UI used in Headers and Labels
        /// </summary>
        public static new string DisplayName
        {
            get
            {
                return "Imported InternalElement";
            }
        }

        /// <summary>
        ///   Use ClassToClass Mapping, if the IE is not distinct
        /// </summary>
        public bool MapToClass
        {
            get
            {
                return this.mapToClass;
            }

            set
            {
                this.mapToClass = value;
                this.OnNotifyPropertyChanged("MapToClass");
            }
        }

        #endregion
    }
}